<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
        <tr>
            <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
            <th><{$MOD.title}>(<b class="red"><{$detail.name}> : <{$typeCfg[$type]}></b>)</th>
            <td align="right"><{link ctl="home/home:index" class="button" title="返回我爱我家"}></td>
            <td width="15"></td>
        </tr>
    </table>
</div>
<div class="page-data">
    <div class="tip-notice">
        <div class="SWF_Widget" rel="__SWF_Widget" params='{"submit":"true","home_id":"<{$home_id}>","type":"<{$type}>","OATOKEN":"<{$OATOKEN}>"}'>
            <span rel="__SWF_ctl" class="SWF_Ctl" style="float:left;">控件加载中...</span>
            <span style="display:none;" class="SWF_Loading" rel="l"><span rel="m"></span><span rel="n"></span></span>
        </div>
    </div>    
    <form id="items-form">            
    <table width="100%" border="0" cellspacing="0" class="table-data table">
    <tr><th class="w-100">ID</th><th class="w-50">图片</th><th>图片说明</th><th class="w-150">操作</th></tr>
    <{foreach $items as $item}>
    <tr>
        <td><label><input type="checkbox" value="<{$item.id}>" name="id[]" CK="PRI"/><{$item.id}><label></td>
        <td><img src="<{$pager.img}>/<{$item.pic}>" photo="<{$pager.img}>/<{$item.pic}>" class="wh-50" /></td>
        <td><input type="text" name="title[<{$item.id}>]" value="<{$item.title}>"  class="input w-200"/></td>        
        <td>
            <{link ctl="block/item:push" arg0='huxing' arg1=$item.id title="推送" load="mini:推送户型图" class="button"}>
            <{link ctl="home/photo:delete" args=$item.id act="mini:删除" confirm="mini:确定要删除吗？" title="删除" class="button"}>
        </td>
    </tr>
    <{foreachelse}>
     <tr><td colspan="20"><p class="text-align tip-notice">没有数据</p></td></tr>
    <{/foreach}>
    </table>
    </form>
    <div class="page-bar">
        <table>
            <tr>
            <td class="w-100"><label><input type="checkbox" CKA="PRI"/>&nbsp;&nbsp;全选</label></td>
            <td colspan="10" class="left">
                <{link ctl="home/photo:delete" type="button" submit="mini:#items-form" confirm="mini:确定要批量删除选中的内容吗?" priv="hide" value="批量删除"}>
                <{link ctl="block/item:batch" args='huxing' type="button" load="mini:批量推荐户型图" batch="mini:PRI" priv="hide" value="批量推荐"}>
                <{link ctl="home/photo:update" type="button" submit="mini:#items-form"  priv="hide" value="批量更新"}>
            </td>
            <td class="page-list"></td>
        </tr>
        </table>
    </div>
</div>
<script src="<{$pager.res}>/swfupload/swfupload.js" type="text/javascript"></script>
<script src="<{$pager.res}>/script/kt.upload.js" type="text/javascript"></script>
<script type="text/javascript">
(function(K, $){
$(document).ready(function(){
var Events = {
    upload_all_complete : function(event,files){
        Widget.MsgBox.success("全部图片上传完成！");
        window.location.reload(true);
    }
};
$("div[rel='__SWF_Widget']").each(function(){
    $(this).SWFUpload({
        file_size_limit : "30 MB",
        file_upload_limit : 30,
        upload_url: "?home/photo-upload.html",
        file_types : "*.jpg;*.gif;*.jpeg;*.png;",
        file_types_description : "添加图片",
        flash_url : "<{$pager.res}>/swfupload/swfupload.swf",
        button_image_url : "<{$pager.res}>/swfupload/photo.jpg",
        button_placeholder :$("[rel='__SWF_ctl']",this)[0],
        button_width: 84,
        button_height: 24,
        events:Events,
        debug : false
    });
});
});
})(window.KT, window.jQuery)
</script>
<{include file="admin:common/footer.html"}>